//
//  STStatusDTO.m
//  OCVVeibo
//
//  Created by leergou on 16/7/27.
//  Copyright © 2016年 WhiteHouse. All rights reserved.
//

#import "STStatusDTO.h"

@implementation STStatusDTO

// 实现该方法,解决 id 和 系统关键字冲突
+ (NSDictionary *)modelCustomPropertyMapper{
    
    return @{@"ID" : @"id",
             };
}


/*
 # YYAlbum.h
 @property (nonatomic, copy) NSString *name;
 @property (nonatomic, strong) NSArray *photos; # Array<YYPhoto>
 @property (nonatomic, strong) NSDictionary *likedUsers; # Key:name(NSString) Value:user(YYUser)
 @property (nonatomic, strong) NSSet *likedUserIds; # Set<NSNumber>
 
 # YYPhoto.h
 @property (nonatomic, copy) NSString *url;
 @property (nonatomic, copy) NSString *desc;
 
 # YYAlbum.m
 #把数组里面带有对象的类型专门按照这个方法，这个格式写出来
 -(nullable NSDictionary<NSString *, id> *)modelContainerPropertyGenericClass{
 return @{
 @"photos"       : YYPhoto.class,
 @"likedUsers"   : YYUser.class,
 @"likedUserIds" : NSNumber.class
 };
 }
 */

//// 用户信息
//@property (nonatomic,strong) STUserInfoDTO *user;
//// 转发微博
//@property (nonatomic,strong) STStatusDTO *retweeted_status;
//// 配图
//@property (nonatomic,strong) NSArray *pic_urls;

//把数组里面带有对象的类型专门按照这个方法，这个格式写出来
#warning  为什么不起作用,还是转不了????
//-(nullable NSDictionary<NSString *, id> *)modelContainerPropertyGenericClass{
//    return @{
////             @"user"       : STUserInfoDTO.class,
////             @"retweeted_status"   : STStatusDTO,
//             @"pic_urls" : STStatusPictureInfo.class
//             };
//}






// 黑名单
//+ (NSArray *)modelPropertyBlacklist {
//    return @[@"pic_urls"];
//}


//// - model
//
//- (BOOL)modelCustomTransformFromDictionary:(NSDictionary *)dic {
////    NSNumber *timestamp = dic[@"timestamp"];
////    if (![timestamp isKindOfClass:[NSNumber class]]) return NO;
////    _createdAt = [NSDate dateWithTimeIntervalSince1970:timestamp.floatValue];
//    
////    NSLog(@"yy:%@",dic);
////    
////    NSArray *array = dic[@"pic_urls"];
////    
////    if (array) {
////        // 定义一个可变数组
////        NSMutableArray *mutable = [NSMutableArray array];
////        // 将数组中的图片信息转成数组
////        for (NSDictionary *dict in array) {
////            // 字典转模型
////            STStatusPictureInfo *pictureInfo = [STStatusPictureInfo yy_modelWithDictionary:dict];
////            // 添加到数组
////            [mutable addObject:pictureInfo];
////        }
////        // 赋值给模型的 pic_urls 数组
////        self.pic_urls = mutable.copy;
////        
////    }
//    return YES;
//}
//
//


@end
